

//int main(int argc,char *argv[])
//{
//   open(argv[1],O_WRONLY|O_CREAT,0666);
//   return 0;
//}
//

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
 
int main()
{
 
    printf("stdin:%d\n",stdin->_fileno);
    printf("stdout:%d\n",stdout->_fileno);
    printf("stderr:%d\n",stderr->_fileno);
    FILE *fp = fopen("log.txt","w");
    printf("fp:%d\n",fp->_fileno);
 
    return 0;
} 



//#define ONE (1<<0)
//#define TWO (1<<1)
//#define THREE (1<<2)
//#define FOUR (1<<3)
//#define FIVE (1<<4)
//void mytest(int flag)
//{
//	if(flag & ONE)
//		printf("this is ONE\n");
//	if(flag & TWO)
//		printf("this is TWO\n");
//	if(flag & THREE)
//		printf("this is THREE\n");
//	if(flag & FOUR)
//		printf("this is FOUR\n");
//	if(flag & FIVE)
//		printf("this is FIVE\n");
// }
// 
// int main()
// {
//	mytest(ONE);
//	printf("----------------------------------\n");
//	mytest(ONE | TWO);
//	printf("----------------------------------\n");
//	mytest(ONE | TWO | THREE);
//	printf("----------------------------------\n");
//	mytest(ONE | TWO | THREE | FOUR);
//	printf("----------------------------------\n");                                                                                                                                    
//	mytest(ONE | TWO | THREE | FOUR | FIVE); 
// 
//    return 0;
//}
//
